#!/usr/bin/python3
# -*- coding: utf-8 -*-

import logging; logging.basicConfig(level=logging.INFO)
from aiohttp import web
import asyncio
async def init():
    app = web.Application()
    runner = web.AppRunner(app)
    await runner.setup()
    site = web.TCPSite(runner, 'localhost', 9000)
    logging.info('server started at http://localhost:9000...')
    await site.start()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(init())
    loop.run_forever()